package com.newaim.util.aop;

public class UserContext {
    private static final ThreadLocal<SysUser> CONTEXT = new InheritableThreadLocal<>();

    public static void set(SysUser user) {
        CONTEXT.remove();
        CONTEXT.set(user);
    }

    public static SysUser get() {
        return CONTEXT.get();
    }

    public static void remove() {
        CONTEXT.remove();
    }
}
